# -*- mode: snippet -*-
# name: ggplot geom_dotplot template
# key: ggplot2.geom_dotplot.template
# key: geom_dotplot.template@ggplot2
# contributor: Shuguang Sun
# --
ggplot(${1:dt}, aes(x = ${2:x}, y = ${3:y})) + # define x and y axis variables
  geom_dotplot(binaxis="y", stackdir="center", dotsize=0.3) + # Box plot with dot plot
  stat_summary(
  # Box plot with mean points
  fun = mean,
  geom = "point",
  shape = 23,
  size = 4) +
  # coord_flip() + # Rotate the box plot
  labs(x = "", y = "")
